import request from '@/utils/request'

/*
 * 获取地址列表
 * */
export function getAddressList(data) {
  return request({
    url: '/api/Address/index',
    method: 'post',
    data:data,
    power: false
  })
}


/*
 * 获取详情
 * */
export function getAddressDetails(data) {
  return request({
    url: '/api/Address/getDetails',
    method: 'post',
    data:data,
    power: false
  })
}



/*
 * 获取默认地址详情
 * */
export function getDefault(data) {
  return request({
    url: '/index.php/api/Address/getDefault',
    method: 'post',
    data:data,
    power: false
  })
}

/*
 * 修改添加列表
 * */
export function saveAddress(data) {
  return request({
    url: '/index.php/api/Address/saveData',
    method: 'post',
    data:data,
    power: false
  })
}

/*
 * 设置为默认
 * */
export function setAddressDefault(data) {
  return request({
    url: '/index.php/api/Address/setAddressDefault',
    method: 'post',
    data:data,
    power: false
  })
}

/*
 * 删除地址
 * */
export function delAddressDetails(data) {
  return request({
    url: '/index.php/api/Address/del',
    method: 'post',
    data:data,
    power: false
  })
}